<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <!-- 读取存储在model中数据-->
    <span th:text="${msg}"></span>
    <hr/>
    <!--获取对象属性值-->
    <span th:text="${user.id}"></span><br/>
    <span th:text="${user.name}"></span><br/>
    <span th:text="${user.sex}"></span><br/>
    <span th:text="${user.age}"></span><br/>
    <hr/>
    <!-- 从内置对象session中读取数据-->
    <span th:text="${session.name}" >从request读取数据</span>
    <hr/>
    <!-- 使用内置工具类格式化数据-->
    <span th:text="${#dates.format(date,'yyyy-MM-dd HH:mm:ss')}"></span>
    <hr/>
    <!--字符串拼接-->
    <span th:text="|欢迎你${user.name}|"></span>
</body>
</html>